﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Complain.aspx.cs" Inherits="StreetSmartAdmin.Complain" %>
<%@ Register TagPrefix="CustUserCtrl" TagName="Header" Src="Header.ascx" %>
<%@ Register TagPrefix="CustUserCtrl" TagName="Footer" Src="Footer.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<script language="javascript" type="text/javascript" src="WdatePicker.js"></script>
<head runat="server">
    <title></title>
    <link type="text/css" rel="stylesheet" href="style.css" />
    <style type="text/css">

    #topsection{

    height: 90px; 
    }

    #topsection h1{
    margin: 0;
    padding-top: 15px;
    }


    #contentwrapper{
    float: left;
    /*width: 80%;/*Set right margin to RightColumnWidth*/
    }

    #contentcolumn{
    margin-right: 10px; /*Set right margin to RightColumnWidth*/
    }

    #rightcolumn{
    float: right;
    /*width: 20%; Width of right column in pixels*/
    /*margin-left: -100px; Set left margin to -(RightColumnWidth) */

    }




    </style>




</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
    <CustUserCtrl:Header ID="Header" runat="server"></CustUserCtrl:Header>
    <div>

    <div id="topsection"><h1>Customer Feedback</h1></div>



    <div id="contentwrapper">
        <center>
        



        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
            
            SelectCommand="SELECT * FROM [tblFeedback] ORDER BY [REGI_DATE] DESC" 
            DeleteCommand="DELETE FROM [tblFeedback] WHERE [CFID] = @CFID" 
            InsertCommand="INSERT INTO [tblFeedback] ([REGI_DATE], [ID_TYPE], [USERID], [COMPANY_NAME], [TITLE], [FIRSTNAME], [LASTNAME], [EMAIL], [PHONE], [MOBILE], [FAX], [ADDRESS], [SUBURB], [STATE], [POSTCODE]) VALUES (@REGI_DATE, @ID_TYPE, @USERID, @COMPANY_NAME, @TITLE, @FIRSTNAME, @LASTNAME, @EMAIL, @PHONE, @MOBILE, @FAX, @ADDRESS, @SUBURB, @STATE, @POSTCODE)" 
           
            UpdateCommand="UPDATE [tblFeedback] SET [REGI_DATE] = @REGI_DATE, [ID_TYPE] = @ID_TYPE, [USERID] = @USERID, [COMPANY_NAME] = @COMPANY_NAME, [TITLE] = @TITLE, [FIRSTNAME] = @FIRSTNAME, [LASTNAME] = @LASTNAME, [EMAIL] = @EMAIL, [PHONE] = @PHONE, [MOBILE] = @MOBILE, [FAX] = @FAX, [ADDRESS] = @ADDRESS, [SUBURB] = @SUBURB, [STATE] = @STATE, [POSTCODE] = @POSTCODE WHERE [CFID] = @CFID"
            
            filterexpression="COMPANY_NAME LIKE '%{0}%' or FIRSTNAME  LIKE '%{0}%' or LASTNAME LIKE '%{0}%'  or EMAIL  LIKE '%{0}%'">
            <filterparameters>
                <asp:controlparameter controlid="searchBox" propertyname="Text" />
             </filterparameters>
            
            
            
            <DeleteParameters>
                <asp:Parameter Name="CFID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="REGI_DATE" Type="DateTime" />
                <asp:Parameter Name="ID_TYPE" Type="String" />
                <asp:Parameter Name="USERID" Type="Int32" />
                <asp:Parameter Name="COMPANY_NAME" Type="String" />
                <asp:Parameter Name="TITLE" Type="String" />
                <asp:Parameter Name="FIRSTNAME" Type="String" />
                <asp:Parameter Name="LASTNAME" Type="String" />
                <asp:Parameter Name="EMAIL" Type="String" />
                <asp:Parameter Name="PHONE" Type="String" />
                <asp:Parameter Name="MOBILE" Type="String" />
                <asp:Parameter Name="FAX" Type="String" />
                <asp:Parameter Name="ADDRESS" Type="String" />
                <asp:Parameter Name="SUBURB" Type="String" />
                <asp:Parameter Name="STATE" Type="String" />
                <asp:Parameter Name="POSTCODE" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="REGI_DATE" Type="DateTime" />
                <asp:Parameter Name="ID_TYPE" Type="String" />
                <asp:Parameter Name="USERID" Type="Int32" />
                <asp:Parameter Name="COMPANY_NAME" Type="String" />
                <asp:Parameter Name="TITLE" Type="String" />
                <asp:Parameter Name="FIRSTNAME" Type="String" />
                <asp:Parameter Name="LASTNAME" Type="String" />
                <asp:Parameter Name="EMAIL" Type="String" />
                <asp:Parameter Name="PHONE" Type="String" />
                <asp:Parameter Name="MOBILE" Type="String" />
                <asp:Parameter Name="FAX" Type="String" />
                <asp:Parameter Name="ADDRESS" Type="String" />
                <asp:Parameter Name="SUBURB" Type="String" />
                <asp:Parameter Name="STATE" Type="String" />
                <asp:Parameter Name="POSTCODE" Type="String" />
                <asp:Parameter Name="CFID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>


        <asp:GridView ID="GridView1" runat="server" CssClass="mGrid" 
            PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" 
            DataSourceID="SqlDataSource1" AutoGenerateColumns="False" 
            DataKeyNames="CFID" AllowPaging="True" AllowSorting="True"
            onselectedindexchanged="GridView1_SelectedIndexChanged" 
            OnRowDeleting="GridView1_RowDeleting" ShowFooter="True"
            EnableModelValidation="True">
            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
            <Columns>


                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Select" Text="Select"></asp:LinkButton> 
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:LinkButton ID="btnAddG1" runat="server" Text="New" OnClick="btnAddG1_click"></asp:LinkButton>
                        
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                            CommandName="Delete" Text="Delete" OnClientClick="return confirm('Are You Sure to Delete?')"></asp:LinkButton>
                </ItemTemplate>

                </asp:TemplateField>



                <asp:BoundField DataField="CFID" HeaderText="CFID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="CFID" />
                <asp:BoundField DataField="REGI_DATE" HeaderText="REGI_DATE" 
                    SortExpression="REGI_DATE" />
                <asp:BoundField DataField="ID_TYPE" HeaderText="ID_TYPE" 
                    SortExpression="ID_TYPE" />
                <asp:BoundField DataField="USERID" HeaderText="USERID" 
                    SortExpression="USERID" />
                <asp:BoundField DataField="COMPANY_NAME" HeaderText="COMPANY_NAME" 
                    SortExpression="COMPANY_NAME" />
                <asp:BoundField DataField="TITLE" HeaderText="TITLE" SortExpression="TITLE" />
                <asp:BoundField DataField="FIRSTNAME" HeaderText="FIRSTNAME" 
                    SortExpression="FIRSTNAME" />
                <asp:BoundField DataField="LASTNAME" HeaderText="LASTNAME" 
                    SortExpression="LASTNAME" />
                <asp:BoundField DataField="EMAIL" HeaderText="EMAIL" SortExpression="EMAIL" />
                <asp:BoundField DataField="PHONE" HeaderText="PHONE" SortExpression="PHONE" />
                <asp:BoundField DataField="MOBILE" HeaderText="MOBILE" 
                    SortExpression="MOBILE" />
                <asp:BoundField DataField="FAX" HeaderText="FAX" SortExpression="FAX" />
                <asp:BoundField DataField="ADDRESS" HeaderText="ADDRESS" 
                    SortExpression="ADDRESS" />
                <asp:BoundField DataField="SUBURB" HeaderText="SUBURB" 
                    SortExpression="SUBURB" />
                <asp:BoundField DataField="STATE" HeaderText="STATE" SortExpression="STATE" />
                <asp:BoundField DataField="POSTCODE" HeaderText="POSTCODE" 
                    SortExpression="POSTCODE" />
            </Columns>

<PagerStyle CssClass="pgr"></PagerStyle>
        </asp:GridView>


        <asp:Panel ID="panSearch" runat="server" DefaultButton="btnsearch" Width="100%" >
                
                <ASP:TextBox runat="server" type="text" id="searchBox" Width="250px"/>
                <asp:Button ID="btnsearch" runat="server" Text="Search" />

        </asp:Panel>  


        <asp:Label ID="lblupdate" runat="server" Text="" Visible="false"></asp:Label>


        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
            OnUpdated="SqlDataSource2_Updated"
            
            DeleteCommand="DELETE FROM [tblFeedback] WHERE [CFID] = @CFID" 
            InsertCommand="INSERT INTO [tblFeedback] ( [ID_TYPE], [USERID], [COMPANY_NAME], [TITLE], [FIRSTNAME], [LASTNAME], [EMAIL], [PHONE], [MOBILE], [FAX], [ADDRESS], [SUBURB], [STATE], [POSTCODE]) VALUES ( @ID_TYPE, @USERID, @COMPANY_NAME, @TITLE, @FIRSTNAME, @LASTNAME, @EMAIL, @PHONE, @MOBILE, @FAX, @ADDRESS, @SUBURB, @STATE, @POSTCODE)" 
            SelectCommand="SELECT * FROM [tblFeedback] WHERE ([CFID] = @CFID)" 
            
            
            UpdateCommand="UPDATE [tblFeedback] SET  [ID_TYPE] = @ID_TYPE, [USERID] = @USERID, [COMPANY_NAME] = @COMPANY_NAME, [TITLE] = @TITLE, [FIRSTNAME] = @FIRSTNAME, [LASTNAME] = @LASTNAME, [EMAIL] = @EMAIL, [PHONE] = @PHONE, [MOBILE] = @MOBILE, [FAX] = @FAX, [ADDRESS] = @ADDRESS, [SUBURB] = @SUBURB, [STATE] = @STATE, [POSTCODE] = @POSTCODE WHERE [CFID] = @CFID">
            <DeleteParameters>
                <asp:Parameter Name="CFID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                
                <asp:Parameter Name="ID_TYPE" Type="String" />
                <asp:Parameter Name="USERID" Type="Int32" />
                <asp:Parameter Name="COMPANY_NAME" Type="String" />
                <asp:Parameter Name="TITLE" Type="String" />
                <asp:Parameter Name="FIRSTNAME" Type="String" />
                <asp:Parameter Name="LASTNAME" Type="String" />
                <asp:Parameter Name="EMAIL" Type="String" />
                <asp:Parameter Name="PHONE" Type="String" />
                <asp:Parameter Name="MOBILE" Type="String" />
                <asp:Parameter Name="FAX" Type="String" />
                <asp:Parameter Name="ADDRESS" Type="String" />
                <asp:Parameter Name="SUBURB" Type="String" />
                <asp:Parameter Name="STATE" Type="String" />
                <asp:Parameter Name="POSTCODE" Type="String" />
            </InsertParameters>
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" Name="CFID" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
            <UpdateParameters>
                
                <asp:Parameter Name="ID_TYPE" Type="String" />
                <asp:Parameter Name="USERID" Type="Int32" />
                <asp:Parameter Name="COMPANY_NAME" Type="String" />
                <asp:Parameter Name="TITLE" Type="String" />
                <asp:Parameter Name="FIRSTNAME" Type="String" />
                <asp:Parameter Name="LASTNAME" Type="String" />
                <asp:Parameter Name="EMAIL" Type="String" />
                <asp:Parameter Name="PHONE" Type="String" />
                <asp:Parameter Name="MOBILE" Type="String" />
                <asp:Parameter Name="FAX" Type="String" />
                <asp:Parameter Name="ADDRESS" Type="String" />
                <asp:Parameter Name="SUBURB" Type="String" />
                <asp:Parameter Name="STATE" Type="String" />
                <asp:Parameter Name="POSTCODE" Type="String" />
                <asp:Parameter Name="CFID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>

        <asp:DetailsView ID="DetailsView1" runat="Server" DataSourceID="SqlDataSource2" 
            AllowPaging="True" AutoGenerateRows="False"
        DataKeyNames="CFID" CssClass="mGrid"
        PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt"  FieldHeaderStyle-Font-Bold="true" 
        Font-Names="Times New Roman" CommandRowStyle-Font-Size="13"   CommandRowStyle-ForeColor="red" 
            EnableModelValidation="True" oniteminserting="DetailsView1_ItemInserting"
            OnItemInserted="DetailsView1_ItemInserted"
            OnItemUpdated="DetailsView1_ItemUpdated">  


<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

<CommandRowStyle Font-Size="13pt" ForeColor="Red"></CommandRowStyle>

<FieldHeaderStyle Font-Bold="True"></FieldHeaderStyle>


            <Fields>
                <asp:CommandField ShowEditButton="True" EditText="Edit Record" ShowInsertButton="true"   InsertText="Insert Record" UpdateText="Update Record"  NewText=""/>
                <asp:TemplateField HeaderText="CFID" InsertVisible="False" 
                    SortExpression="CFID">
                    <EditItemTemplate>
                        <asp:Label ID="lblCFID" runat="server" Text='<%# Eval("CFID") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblCFID" runat="server" Text='<%# Bind("CFID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Registration Date" SortExpression="REGI_DATE">
                    <EditItemTemplate>
                        <asp:Label ID="REGI_DATE" runat="server" Text='<%# Bind("REGI_DATE") %>'></asp:Label>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("REGI_DATE") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Customer Type" SortExpression="ID_TYPE">
                    <EditItemTemplate>

                        <asp:DropDownList ID="SelID_TYPE" runat="server" SelectedValue='<%# Bind("ID_TYPE") %>' OnSelectedIndexChanged="SelID_TYPEChanged" AutoPostBack="true" >
                                        <asp:ListItem Value="">Select...</asp:ListItem>
                                        <asp:ListItem Value="New">New Customer</asp:ListItem>
                                        <asp:ListItem Value="RESI">Exist RESI</asp:ListItem>
                                        <asp:ListItem Value="SME">Exist SME</asp:ListItem>
                                        <asp:ListItem Value="CI">Exist CI</asp:ListItem>                                          
                                    </asp:DropDownList>



                        <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                            <asp:View ID="View0" runat="server">
                            </asp:View>
                            <asp:View ID="View1" runat="server">
                        <asp:DropDownList ID="ddlCIID" runat="server" AutoPostBack="True" 
                            DataSourceID="SqlDataSource8" DataTextField="USERID" DataValueField="USERID">
                        </asp:DropDownList>
                        <input type="button" ID="CopyCI" runat="server" value="Paste" onclick="CopyCIChanged()"/>
                        <asp:SqlDataSource ID="SqlDataSource8" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                            SelectCommand="SELECT DISTINCT [USERID] FROM [tblCI] ORDER BY [USERID] DESC">
                        </asp:SqlDataSource>
                        <asp:FormView ID="FormView1" runat="server" DataKeyNames="USERID" 
                            DataSourceID="SqlDataSource9" EnableModelValidation="True">
                            <EditItemTemplate>
                                USERID:
                                <asp:Label ID="USERIDLabel1" runat="server" Text='<%# Eval("USERID") %>' />
                                <br />
                                Regi Date:
                                <asp:TextBox ID="REGI_DATETextBox" runat="server" 
                                    Text='<%# Bind("REGI_DATE") %>' />
                                <br />
                                Company Name:
                                <asp:TextBox ID="COMPANY_NAMETextBox" runat="server" 
                                    Text='<%# Bind("COMPANY_NAME") %>' />
                                <br />
                                
                                <asp:TextBox ID="TITLETextBox" runat="server" Text='<%# Bind("TITLE") %>' />
                                &nbsp;
                                <asp:TextBox ID="FIRST_NAMETextBox" runat="server" 
                                    Text='<%# Bind("FIRST_NAME") %>' />
                                &nbsp;
                                <asp:TextBox ID="LAST_NAMETextBox" runat="server" 
                                    Text='<%# Bind("LAST_NAME") %>' />
                                <br />
                                Email:
                                <asp:TextBox ID="EMAILTextBox" runat="server" Text='<%# Bind("EMAIL") %>' />
                                <br />
                                Business Phone:
                                <asp:TextBox ID="BPHONETextBox" runat="server" Text='<%# Bind("BPHONE") %>' />
                                <br />
                                Mobile Phone:
                                <asp:TextBox ID="MOBILETextBox" runat="server" Text='<%# Bind("MOBILE") %>' />
                                <br />
                                Fax:
                                <asp:TextBox ID="FAXTextBox" runat="server" Text='<%# Bind("FAX") %>' />
                                <br />
                                Address:
                                <asp:TextBox ID="NOTICE_ADDRESSTextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_ADDRESS") %>' />
                                &nbsp;
                                <asp:TextBox ID="NOTICE_SUBURBTextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_SUBURB") %>' />
                                &nbsp;
                                <asp:TextBox ID="NOTICE_STATETextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_STATE") %>' />
                                &nbsp;
                                <asp:TextBox ID="NOTICE_POSTCODETextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_POSTCODE") %>' />
                                <br />
                                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                                    CommandName="Update" Text="Update" />
                                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                REGI_DATE:
                                <asp:TextBox ID="REGI_DATETextBox" runat="server" 
                                    Text='<%# Bind("REGI_DATE") %>' />
                                <br />
                                COMPANY_NAME:
                                <asp:TextBox ID="COMPANY_NAMETextBox" runat="server" 
                                    Text='<%# Bind("COMPANY_NAME") %>' />
                                <br />
                                TITLE:
                                <asp:TextBox ID="TITLETextBox" runat="server" Text='<%# Bind("TITLE") %>' />
                                <br />
                                FIRST_NAME:
                                <asp:TextBox ID="FIRST_NAMETextBox" runat="server" 
                                    Text='<%# Bind("FIRST_NAME") %>' />
                                <br />
                                LAST_NAME:
                                <asp:TextBox ID="LAST_NAMETextBox" runat="server" 
                                    Text='<%# Bind("LAST_NAME") %>' />
                                <br />
                                EMAIL:
                                <asp:TextBox ID="EMAILTextBox" runat="server" Text='<%# Bind("EMAIL") %>' />
                                <br />
                                BPHONE:
                                <asp:TextBox ID="BPHONETextBox" runat="server" Text='<%# Bind("BPHONE") %>' />
                                <br />
                                MOBILE:
                                <asp:TextBox ID="MOBILETextBox" runat="server" Text='<%# Bind("MOBILE") %>' />
                                <br />
                                FAX:
                                <asp:TextBox ID="FAXTextBox" runat="server" Text='<%# Bind("FAX") %>' />
                                <br />
                                NOTICE_ADDRESS:
                                <asp:TextBox ID="NOTICE_ADDRESSTextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_ADDRESS") %>' />
                                <br />
                                NOTICE_SUBURB:
                                <asp:TextBox ID="NOTICE_SUBURBTextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_SUBURB") %>' />
                                <br />
                                NOTICE_STATE:
                                <asp:TextBox ID="NOTICE_STATETextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_STATE") %>' />
                                <br />
                                NOTICE_POSTCODE:
                                <asp:TextBox ID="NOTICE_POSTCODETextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_POSTCODE") %>' />
                                <br />
                                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                                    CommandName="Insert" Text="Insert" />
                                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                            </InsertItemTemplate>
                            <ItemTemplate>
                                USERID:
                                <asp:Label ID="USERIDLabel" runat="server" Text='<%# Eval("USERID") %>' />
                                <br />
                                REGI_DATE:
                                <asp:Label ID="REGI_DATELabel" runat="server" Text='<%# Bind("REGI_DATE") %>' />
                                <br />
                                COMPANY_NAME:
                                <asp:Label ID="COMPANY_NAMELabel" runat="server" 
                                    Text='<%# Bind("COMPANY_NAME") %>' />
                                <br />
                                TITLE:
                                <asp:Label ID="TITLELabel" runat="server" Text='<%# Bind("TITLE") %>' />
                                <br />
                                FIRST_NAME:
                                <asp:Label ID="FIRST_NAMELabel" runat="server" 
                                    Text='<%# Bind("FIRST_NAME") %>' />
                                <br />
                                LAST_NAME:
                                <asp:Label ID="LAST_NAMELabel" runat="server" Text='<%# Bind("LAST_NAME") %>' />
                                <br />
                                EMAIL:
                                <asp:Label ID="EMAILLabel" runat="server" Text='<%# Bind("EMAIL") %>' />
                                <br />
                                BPHONE:
                                <asp:Label ID="BPHONELabel" runat="server" Text='<%# Bind("BPHONE") %>' />
                                <br />
                                MOBILE:
                                <asp:Label ID="MOBILELabel" runat="server" Text='<%# Bind("MOBILE") %>' />
                                <br />
                                FAX:
                                <asp:Label ID="FAXLabel" runat="server" Text='<%# Bind("FAX") %>' />
                                <br />
                                NOTICE_ADDRESS:
                                <asp:Label ID="NOTICE_ADDRESSLabel" runat="server" 
                                    Text='<%# Bind("NOTICE_ADDRESS") %>' />
                                <br />
                                NOTICE_SUBURB:
                                <asp:Label ID="NOTICE_SUBURBLabel" runat="server" 
                                    Text='<%# Bind("NOTICE_SUBURB") %>' />
                                <br />
                                NOTICE_STATE:
                                <asp:Label ID="NOTICE_STATELabel" runat="server" 
                                    Text='<%# Bind("NOTICE_STATE") %>' />
                                <br />
                                NOTICE_POSTCODE:
                                <asp:Label ID="NOTICE_POSTCODELabel" runat="server" 
                                    Text='<%# Bind("NOTICE_POSTCODE") %>' />
                                <br />
                            </ItemTemplate>
                        </asp:FormView>
                        <asp:SqlDataSource ID="SqlDataSource9" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                            SelectCommand="SELECT [USERID], [REGI_DATE], [COMPANY_NAME], [TITLE], [FIRST_NAME], [LAST_NAME], [EMAIL], [BPHONE], [MOBILE], [FAX], [NOTICE_ADDRESS], [NOTICE_SUBURB], [NOTICE_STATE], [NOTICE_POSTCODE] FROM [tblCI] WHERE ([USERID] = @USERID)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlCIID" Name="USERID" 
                                    PropertyName="SelectedValue" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                            </asp:View>
                            <asp:View ID="View2" runat="server">
                        <asp:DropDownList ID="ddlSMEID" runat="server" DataSourceID="SqlDataSource10" 
                            DataTextField="UserID" DataValueField="UserID" AutoPostBack="True">
                        </asp:DropDownList>
                        <input type="button" ID="ButtonCopyRS" runat="server" value="Paste" onclick="CopyRSChanged()"/>
                        <asp:SqlDataSource ID="SqlDataSource10" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                            
                            SelectCommand="SELECT DISTINCT [UserID] FROM [tblUser] ORDER BY [UserID] DESC"></asp:SqlDataSource>
                        <asp:FormView ID="FormView2" runat="server" DataSourceID="SqlDataSource11" 
                            EnableModelValidation="True">
                            <EditItemTemplate>
                                UserID:
                                <asp:TextBox ID="UserIDTextBox" runat="server" Text='<%# Bind("UserID") %>' />
                                <br />
                                CompanyName:
                                <asp:TextBox ID="CompanyNameTextBox" runat="server" 
                                    Text='<%# Bind("CompanyName") %>' />
                                <br />
                                FirstAccountHolderTitle:
                                <asp:TextBox ID="FirstAccountHolderTitleTextBox" runat="server" 
                                    Text='<%# Bind("FirstAccountHolderTitle") %>' />
                                <br />
                                FirstName:
                                <asp:TextBox ID="FirstNameTextBox" runat="server" 
                                    Text='<%# Bind("FirstName") %>' />
                                <br />
                                LastName:
                                <asp:TextBox ID="LastNameTextBox" runat="server" 
                                    Text='<%# Bind("LastName") %>' />
                                <br />
                                Email:
                                <asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
                                <br />
                                Phone:
                                <asp:TextBox ID="PhoneTextBox" runat="server" Text='<%# Bind("Phone") %>' />
                                <br />
                                Mobile:
                                <asp:TextBox ID="MobileTextBox" runat="server" Text='<%# Bind("Mobile") %>' />
                                <br />
                                Fax:
                                <asp:TextBox ID="FaxTextBox" runat="server" Text='<%# Bind("Fax") %>' />
                                <br />
                                Street:
                                <asp:TextBox ID="StreetTextBox" runat="server" Text='<%# Bind("Street") %>' />
                                <br />
                                Suburb:
                                <asp:TextBox ID="SuburbTextBox" runat="server" Text='<%# Bind("Suburb") %>' />
                                <br />
                                StateName:
                                <asp:TextBox ID="StateNameTextBox" runat="server" 
                                    Text='<%# Bind("StateName") %>' />
                                <br />
                                Postcode:
                                <asp:TextBox ID="PostcodeTextBox" runat="server" 
                                    Text='<%# Bind("Postcode") %>' />
                                <br />
                                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                                    CommandName="Update" Text="Update" />
                                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                UserID:
                                <asp:TextBox ID="UserIDTextBox" runat="server" Text='<%# Bind("UserID") %>' />
                                <br />
                                CompanyName:
                                <asp:TextBox ID="CompanyNameTextBox" runat="server" 
                                    Text='<%# Bind("CompanyName") %>' />
                                <br />
                                FirstAccountHolderTitle:
                                <asp:TextBox ID="FirstAccountHolderTitleTextBox" runat="server" 
                                    Text='<%# Bind("FirstAccountHolderTitle") %>' />
                                <br />
                                FirstName:
                                <asp:TextBox ID="FirstNameTextBox" runat="server" 
                                    Text='<%# Bind("FirstName") %>' />
                                <br />
                                LastName:
                                <asp:TextBox ID="LastNameTextBox" runat="server" 
                                    Text='<%# Bind("LastName") %>' />
                                <br />
                                Email:
                                <asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
                                <br />
                                Phone:
                                <asp:TextBox ID="PhoneTextBox" runat="server" Text='<%# Bind("Phone") %>' />
                                <br />
                                Mobile:
                                <asp:TextBox ID="MobileTextBox" runat="server" Text='<%# Bind("Mobile") %>' />
                                <br />
                                Fax:
                                <asp:TextBox ID="FaxTextBox" runat="server" Text='<%# Bind("Fax") %>' />
                                <br />
                                Street:
                                <asp:TextBox ID="StreetTextBox" runat="server" Text='<%# Bind("Street") %>' />
                                <br />
                                Suburb:
                                <asp:TextBox ID="SuburbTextBox" runat="server" Text='<%# Bind("Suburb") %>' />
                                <br />
                                StateName:
                                <asp:TextBox ID="StateNameTextBox" runat="server" 
                                    Text='<%# Bind("StateName") %>' />
                                <br />
                                Postcode:
                                <asp:TextBox ID="PostcodeTextBox" runat="server" 
                                    Text='<%# Bind("Postcode") %>' />
                                <br />
                                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                                    CommandName="Insert" Text="Insert" />
                                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                            </InsertItemTemplate>
                            <ItemTemplate>
                                UserID:
                                <asp:Label ID="UserIDLabel" runat="server" Text='<%# Bind("UserID") %>' />
                                <br />
                                CompanyName:
                                <asp:Label ID="CompanyNameLabel" runat="server" 
                                    Text='<%# Bind("CompanyName") %>' />
                                <br />
                                FirstAccountHolderTitle:
                                <asp:Label ID="FirstAccountHolderTitleLabel" runat="server" 
                                    Text='<%# Bind("FirstAccountHolderTitle") %>' />
                                <br />
                                FirstName:
                                <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Bind("FirstName") %>' />
                                <br />
                                LastName:
                                <asp:Label ID="LastNameLabel" runat="server" Text='<%# Bind("LastName") %>' />
                                <br />
                                Email:
                                <asp:Label ID="EmailLabel" runat="server" Text='<%# Bind("Email") %>' />
                                <br />
                                Phone:
                                <asp:Label ID="PhoneLabel" runat="server" Text='<%# Bind("Phone") %>' />
                                <br />
                                Mobile:
                                <asp:Label ID="MobileLabel" runat="server" Text='<%# Bind("Mobile") %>' />
                                <br />
                                Fax:
                                <asp:Label ID="FaxLabel" runat="server" Text='<%# Bind("Fax") %>' />
                                <br />
                                Street:
                                <asp:Label ID="StreetLabel" runat="server" Text='<%# Bind("Street") %>' />
                                <br />
                                Suburb:
                                <asp:Label ID="SuburbLabel" runat="server" Text='<%# Bind("Suburb") %>' />
                                <br />
                                StateName:
                                <asp:Label ID="StateNameLabel" runat="server" Text='<%# Bind("StateName") %>' />
                                <br />
                                Postcode:
                                <asp:Label ID="PostcodeLabel" runat="server" Text='<%# Bind("Postcode") %>' />
                                <br />
                            </ItemTemplate>
                        </asp:FormView>
                        <asp:SqlDataSource ID="SqlDataSource11" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                            SelectCommand="SELECT [UserID], [CompanyName], [FirstAccountHolderTitle], [FirstName], [LastName], [Email], [Phone], [Mobile], [Fax], [Street], [Suburb], [StateName], [Postcode] FROM [tblUser] WHERE ([UserID] = @UserID)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlSMEID" Name="UserID" 
                                    PropertyName="SelectedValue" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>

                            </asp:View>
                        </asp:MultiView>

                        <div id="SelID_TYPE_div">
                            Exist UserID:
                            <asp:TextBox ID="USERID" runat="server" Text='<%# Bind("USERID") %>'></asp:TextBox>
                        </div>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        
                        <asp:DropDownList ID="SelID_TYPE" runat="server" SelectedValue='<%# Bind("ID_TYPE") %>' OnSelectedIndexChanged="SelID_TYPEChanged" AutoPostBack="true">
                                        <asp:ListItem Value="">Select...</asp:ListItem>
                                        <asp:ListItem Value="New">New Customer</asp:ListItem>
                                        <asp:ListItem Value="RESI">Exist RESI</asp:ListItem>
                                        <asp:ListItem Value="SME">Exist SME</asp:ListItem>
                                        <asp:ListItem Value="CI">Exist CI</asp:ListItem>                                          
                                    </asp:DropDownList>


                        <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                            <asp:View ID="View0" runat="server">
                            </asp:View>
                            <asp:View ID="View1" runat="server">
                        <asp:DropDownList ID="ddlCIID" runat="server" AutoPostBack="True" 
                            DataSourceID="SqlDataSource8" DataTextField="USERID" DataValueField="USERID">
                        </asp:DropDownList>
                        <input type="button" ID="CopyCI" runat="server" value="Paste" onclick="CopyCIChanged()"/>
                        <asp:SqlDataSource ID="SqlDataSource8" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                            SelectCommand="SELECT DISTINCT [USERID] FROM [tblCI] ORDER BY [USERID] DESC">
                        </asp:SqlDataSource>
                        <asp:FormView ID="FormView1" runat="server" DataKeyNames="USERID" 
                            DataSourceID="SqlDataSource9" EnableModelValidation="True">
                            <EditItemTemplate>
                                USERID:
                                <asp:Label ID="USERIDLabel1" runat="server" Text='<%# Eval("USERID") %>' />
                                <br />
                                Regi Date:
                                <asp:TextBox ID="REGI_DATETextBox" runat="server" 
                                    Text='<%# Bind("REGI_DATE") %>' />
                                <br />
                                Company Name:
                                <asp:TextBox ID="COMPANY_NAMETextBox" runat="server" 
                                    Text='<%# Bind("COMPANY_NAME") %>' />
                                <br />
                                
                                <asp:TextBox ID="TITLETextBox" runat="server" Text='<%# Bind("TITLE") %>' />
                                &nbsp;
                                <asp:TextBox ID="FIRST_NAMETextBox" runat="server" 
                                    Text='<%# Bind("FIRST_NAME") %>' />
                                &nbsp;
                                <asp:TextBox ID="LAST_NAMETextBox" runat="server" 
                                    Text='<%# Bind("LAST_NAME") %>' />
                                <br />
                                Email:
                                <asp:TextBox ID="EMAILTextBox" runat="server" Text='<%# Bind("EMAIL") %>' />
                                <br />
                                Business Phone:
                                <asp:TextBox ID="BPHONETextBox" runat="server" Text='<%# Bind("BPHONE") %>' />
                                <br />
                                Mobile Phone:
                                <asp:TextBox ID="MOBILETextBox" runat="server" Text='<%# Bind("MOBILE") %>' />
                                <br />
                                Fax:
                                <asp:TextBox ID="FAXTextBox" runat="server" Text='<%# Bind("FAX") %>' />
                                <br />
                                Address:
                                <asp:TextBox ID="NOTICE_ADDRESSTextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_ADDRESS") %>' />
                                &nbsp;
                                <asp:TextBox ID="NOTICE_SUBURBTextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_SUBURB") %>' />
                                &nbsp;
                                <asp:TextBox ID="NOTICE_STATETextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_STATE") %>' />
                                &nbsp;
                                <asp:TextBox ID="NOTICE_POSTCODETextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_POSTCODE") %>' />
                                <br />
                                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                                    CommandName="Update" Text="Update" />
                                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                REGI_DATE:
                                <asp:TextBox ID="REGI_DATETextBox" runat="server" 
                                    Text='<%# Bind("REGI_DATE") %>' />
                                <br />
                                COMPANY_NAME:
                                <asp:TextBox ID="COMPANY_NAMETextBox" runat="server" 
                                    Text='<%# Bind("COMPANY_NAME") %>' />
                                <br />
                                TITLE:
                                <asp:TextBox ID="TITLETextBox" runat="server" Text='<%# Bind("TITLE") %>' />
                                <br />
                                FIRST_NAME:
                                <asp:TextBox ID="FIRST_NAMETextBox" runat="server" 
                                    Text='<%# Bind("FIRST_NAME") %>' />
                                <br />
                                LAST_NAME:
                                <asp:TextBox ID="LAST_NAMETextBox" runat="server" 
                                    Text='<%# Bind("LAST_NAME") %>' />
                                <br />
                                EMAIL:
                                <asp:TextBox ID="EMAILTextBox" runat="server" Text='<%# Bind("EMAIL") %>' />
                                <br />
                                BPHONE:
                                <asp:TextBox ID="BPHONETextBox" runat="server" Text='<%# Bind("BPHONE") %>' />
                                <br />
                                MOBILE:
                                <asp:TextBox ID="MOBILETextBox" runat="server" Text='<%# Bind("MOBILE") %>' />
                                <br />
                                FAX:
                                <asp:TextBox ID="FAXTextBox" runat="server" Text='<%# Bind("FAX") %>' />
                                <br />
                                NOTICE_ADDRESS:
                                <asp:TextBox ID="NOTICE_ADDRESSTextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_ADDRESS") %>' />
                                <br />
                                NOTICE_SUBURB:
                                <asp:TextBox ID="NOTICE_SUBURBTextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_SUBURB") %>' />
                                <br />
                                NOTICE_STATE:
                                <asp:TextBox ID="NOTICE_STATETextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_STATE") %>' />
                                <br />
                                NOTICE_POSTCODE:
                                <asp:TextBox ID="NOTICE_POSTCODETextBox" runat="server" 
                                    Text='<%# Bind("NOTICE_POSTCODE") %>' />
                                <br />
                                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                                    CommandName="Insert" Text="Insert" />
                                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                            </InsertItemTemplate>
                            <ItemTemplate>
                                USERID:
                                <asp:Label ID="USERIDLabel" runat="server" Text='<%# Eval("USERID") %>' />
                                <br />
                                REGI_DATE:
                                <asp:Label ID="REGI_DATELabel" runat="server" Text='<%# Bind("REGI_DATE") %>' />
                                <br />
                                COMPANY_NAME:
                                <asp:Label ID="COMPANY_NAMELabel" runat="server" 
                                    Text='<%# Bind("COMPANY_NAME") %>' />
                                <br />
                                TITLE:
                                <asp:Label ID="TITLELabel" runat="server" Text='<%# Bind("TITLE") %>' />
                                <br />
                                FIRST_NAME:
                                <asp:Label ID="FIRST_NAMELabel" runat="server" 
                                    Text='<%# Bind("FIRST_NAME") %>' />
                                <br />
                                LAST_NAME:
                                <asp:Label ID="LAST_NAMELabel" runat="server" Text='<%# Bind("LAST_NAME") %>' />
                                <br />
                                EMAIL:
                                <asp:Label ID="EMAILLabel" runat="server" Text='<%# Bind("EMAIL") %>' />
                                <br />
                                BPHONE:
                                <asp:Label ID="BPHONELabel" runat="server" Text='<%# Bind("BPHONE") %>' />
                                <br />
                                MOBILE:
                                <asp:Label ID="MOBILELabel" runat="server" Text='<%# Bind("MOBILE") %>' />
                                <br />
                                FAX:
                                <asp:Label ID="FAXLabel" runat="server" Text='<%# Bind("FAX") %>' />
                                <br />
                                NOTICE_ADDRESS:
                                <asp:Label ID="NOTICE_ADDRESSLabel" runat="server" 
                                    Text='<%# Bind("NOTICE_ADDRESS") %>' />
                                <br />
                                NOTICE_SUBURB:
                                <asp:Label ID="NOTICE_SUBURBLabel" runat="server" 
                                    Text='<%# Bind("NOTICE_SUBURB") %>' />
                                <br />
                                NOTICE_STATE:
                                <asp:Label ID="NOTICE_STATELabel" runat="server" 
                                    Text='<%# Bind("NOTICE_STATE") %>' />
                                <br />
                                NOTICE_POSTCODE:
                                <asp:Label ID="NOTICE_POSTCODELabel" runat="server" 
                                    Text='<%# Bind("NOTICE_POSTCODE") %>' />
                                <br />
                            </ItemTemplate>
                        </asp:FormView>
                        <asp:SqlDataSource ID="SqlDataSource9" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                            SelectCommand="SELECT [USERID], [REGI_DATE], [COMPANY_NAME], [TITLE], [FIRST_NAME], [LAST_NAME], [EMAIL], [BPHONE], [MOBILE], [FAX], [NOTICE_ADDRESS], [NOTICE_SUBURB], [NOTICE_STATE], [NOTICE_POSTCODE] FROM [tblCI] WHERE ([USERID] = @USERID)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlCIID" Name="USERID" 
                                    PropertyName="SelectedValue" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                            </asp:View>
                            <asp:View ID="View2" runat="server">
                        <asp:DropDownList ID="ddlSMEID" runat="server" DataSourceID="SqlDataSource10" 
                            DataTextField="UserID" DataValueField="UserID" AutoPostBack="True">
                        </asp:DropDownList>
                        <input type="button" ID="ButtonCopyRS" runat="server" value="Paste" onclick="CopyRSChanged()"/>
                        <asp:SqlDataSource ID="SqlDataSource10" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                            
                            SelectCommand="SELECT DISTINCT [UserID] FROM [tblUser] ORDER BY [UserID] DESC"></asp:SqlDataSource>
                        <asp:FormView ID="FormView2" runat="server" DataSourceID="SqlDataSource11" 
                            EnableModelValidation="True">
                            <EditItemTemplate>
                                UserID:
                                <asp:TextBox ID="UserIDTextBox" runat="server" Text='<%# Bind("UserID") %>' />
                                <br />
                                CompanyName:
                                <asp:TextBox ID="CompanyNameTextBox" runat="server" 
                                    Text='<%# Bind("CompanyName") %>' />
                                <br />
                                FirstAccountHolderTitle:
                                <asp:TextBox ID="FirstAccountHolderTitleTextBox" runat="server" 
                                    Text='<%# Bind("FirstAccountHolderTitle") %>' />
                                <br />
                                FirstName:
                                <asp:TextBox ID="FirstNameTextBox" runat="server" 
                                    Text='<%# Bind("FirstName") %>' />
                                <br />
                                LastName:
                                <asp:TextBox ID="LastNameTextBox" runat="server" 
                                    Text='<%# Bind("LastName") %>' />
                                <br />
                                Email:
                                <asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
                                <br />
                                Phone:
                                <asp:TextBox ID="PhoneTextBox" runat="server" Text='<%# Bind("Phone") %>' />
                                <br />
                                Mobile:
                                <asp:TextBox ID="MobileTextBox" runat="server" Text='<%# Bind("Mobile") %>' />
                                <br />
                                Fax:
                                <asp:TextBox ID="FaxTextBox" runat="server" Text='<%# Bind("Fax") %>' />
                                <br />
                                Street:
                                <asp:TextBox ID="StreetTextBox" runat="server" Text='<%# Bind("Street") %>' />
                                <br />
                                Suburb:
                                <asp:TextBox ID="SuburbTextBox" runat="server" Text='<%# Bind("Suburb") %>' />
                                <br />
                                StateName:
                                <asp:TextBox ID="StateNameTextBox" runat="server" 
                                    Text='<%# Bind("StateName") %>' />
                                <br />
                                Postcode:
                                <asp:TextBox ID="PostcodeTextBox" runat="server" 
                                    Text='<%# Bind("Postcode") %>' />
                                <br />
                                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                                    CommandName="Update" Text="Update" />
                                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                UserID:
                                <asp:TextBox ID="UserIDTextBox" runat="server" Text='<%# Bind("UserID") %>' />
                                <br />
                                CompanyName:
                                <asp:TextBox ID="CompanyNameTextBox" runat="server" 
                                    Text='<%# Bind("CompanyName") %>' />
                                <br />
                                FirstAccountHolderTitle:
                                <asp:TextBox ID="FirstAccountHolderTitleTextBox" runat="server" 
                                    Text='<%# Bind("FirstAccountHolderTitle") %>' />
                                <br />
                                FirstName:
                                <asp:TextBox ID="FirstNameTextBox" runat="server" 
                                    Text='<%# Bind("FirstName") %>' />
                                <br />
                                LastName:
                                <asp:TextBox ID="LastNameTextBox" runat="server" 
                                    Text='<%# Bind("LastName") %>' />
                                <br />
                                Email:
                                <asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
                                <br />
                                Phone:
                                <asp:TextBox ID="PhoneTextBox" runat="server" Text='<%# Bind("Phone") %>' />
                                <br />
                                Mobile:
                                <asp:TextBox ID="MobileTextBox" runat="server" Text='<%# Bind("Mobile") %>' />
                                <br />
                                Fax:
                                <asp:TextBox ID="FaxTextBox" runat="server" Text='<%# Bind("Fax") %>' />
                                <br />
                                Street:
                                <asp:TextBox ID="StreetTextBox" runat="server" Text='<%# Bind("Street") %>' />
                                <br />
                                Suburb:
                                <asp:TextBox ID="SuburbTextBox" runat="server" Text='<%# Bind("Suburb") %>' />
                                <br />
                                StateName:
                                <asp:TextBox ID="StateNameTextBox" runat="server" 
                                    Text='<%# Bind("StateName") %>' />
                                <br />
                                Postcode:
                                <asp:TextBox ID="PostcodeTextBox" runat="server" 
                                    Text='<%# Bind("Postcode") %>' />
                                <br />
                                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                                    CommandName="Insert" Text="Insert" />
                                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                            </InsertItemTemplate>
                            <ItemTemplate>
                                UserID:
                                <asp:Label ID="UserIDLabel" runat="server" Text='<%# Bind("UserID") %>' />
                                <br />
                                CompanyName:
                                <asp:Label ID="CompanyNameLabel" runat="server" 
                                    Text='<%# Bind("CompanyName") %>' />
                                <br />
                                FirstAccountHolderTitle:
                                <asp:Label ID="FirstAccountHolderTitleLabel" runat="server" 
                                    Text='<%# Bind("FirstAccountHolderTitle") %>' />
                                <br />
                                FirstName:
                                <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Bind("FirstName") %>' />
                                <br />
                                LastName:
                                <asp:Label ID="LastNameLabel" runat="server" Text='<%# Bind("LastName") %>' />
                                <br />
                                Email:
                                <asp:Label ID="EmailLabel" runat="server" Text='<%# Bind("Email") %>' />
                                <br />
                                Phone:
                                <asp:Label ID="PhoneLabel" runat="server" Text='<%# Bind("Phone") %>' />
                                <br />
                                Mobile:
                                <asp:Label ID="MobileLabel" runat="server" Text='<%# Bind("Mobile") %>' />
                                <br />
                                Fax:
                                <asp:Label ID="FaxLabel" runat="server" Text='<%# Bind("Fax") %>' />
                                <br />
                                Street:
                                <asp:Label ID="StreetLabel" runat="server" Text='<%# Bind("Street") %>' />
                                <br />
                                Suburb:
                                <asp:Label ID="SuburbLabel" runat="server" Text='<%# Bind("Suburb") %>' />
                                <br />
                                StateName:
                                <asp:Label ID="StateNameLabel" runat="server" Text='<%# Bind("StateName") %>' />
                                <br />
                                Postcode:
                                <asp:Label ID="PostcodeLabel" runat="server" Text='<%# Bind("Postcode") %>' />
                                <br />
                            </ItemTemplate>
                        </asp:FormView>
                        <asp:SqlDataSource ID="SqlDataSource11" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                            SelectCommand="SELECT [UserID], [CompanyName], [FirstAccountHolderTitle], [FirstName], [LastName], [Email], [Phone], [Mobile], [Fax], [Street], [Suburb], [StateName], [Postcode] FROM [tblUser] WHERE ([UserID] = @UserID)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlSMEID" Name="UserID" 
                                    PropertyName="SelectedValue" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>

                            </asp:View>
                        </asp:MultiView>

                        <div id="SelID_TYPE_div">
                            Exist UserID:
                            <asp:TextBox ID="USERID" runat="server" Text='<%# Bind("USERID") %>'></asp:TextBox>
                        </div>

                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="ID_TYPE" runat="server" Text='<%# Bind("ID_TYPE") %>'></asp:Label>

                        <div id="SelID_TYPE_div">
                            Exist UserID:
                            <asp:Label ID="USERID" runat="server" Text='<%# Bind("USERID") %>'></asp:Label>



                        </div>


                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText="Contact Detail">
                    <EditItemTemplate>
                        <table border="1">
                            <tr>
                                <td>Title</td>
                                <td><asp:TextBox ID="TITLE" runat="server" Text='<%# Bind("TITLE") %>'></asp:TextBox>
                                </td>
                                <td>Email</td>
                                <td><asp:TextBox ID="EMAIL" runat="server" Text='<%# Bind("EMAIL") %>'></asp:TextBox>
                                </td>
                                <td>Street</td>
                                <td><asp:TextBox ID="ADDRESS" runat="server" Text='<%# Bind("ADDRESS") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>First Name</td>
                                <td><asp:TextBox ID="FIRSTNAME" runat="server" Text='<%# Bind("FIRSTNAME") %>'></asp:TextBox>
                                </td>
                                <td>Business Phone</td>
                                <td><asp:TextBox ID="PHONE" runat="server" Text='<%# Bind("PHONE") %>'></asp:TextBox>
                                </td>
                                <td>Suburb</td>
                                <td><asp:TextBox ID="SUBURB" runat="server" Text='<%# Bind("SUBURB") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Last Name</td>
                                <td><asp:TextBox ID="LASTNAME" runat="server" Text='<%# Bind("LASTNAME") %>'></asp:TextBox>
                                </td>
                                <td>Mobile Phone</td>
                                <td><asp:TextBox ID="MOBILE" runat="server" Text='<%# Bind("MOBILE") %>'></asp:TextBox>
                                </td>
                                <td>State</td>
                                <td><asp:TextBox ID="STATE" runat="server" Text='<%# Bind("STATE") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Company Name</td>
                                <td><asp:TextBox ID="COMPANY_NAME" runat="server" Text='<%# Bind("COMPANY_NAME") %>'></asp:TextBox>
                                </td>
                                <td>Fax</td>
                                <td><asp:TextBox ID="FAX" runat="server" Text='<%# Bind("FAX") %>'></asp:TextBox>
                                </td>
                                <td>Postcode</td>
                                <td><asp:TextBox ID="POSTCODE" runat="server" Text='<%# Bind("POSTCODE") %>'></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <table border="1">
                            <tr>
                                <td>Title</td>
                                <td><asp:Label ID="TITLE" runat="server" Text='<%# Bind("TITLE") %>'></asp:Label>
                                </td>
                                <td>Email</td>
                                <td><asp:Label ID="EMAIL" runat="server" Text='<%# Bind("EMAIL") %>'></asp:Label>
                                </td>
                                <td>Street</td>
                                <td><asp:Label ID="ADDRESS" runat="server" Text='<%# Bind("ADDRESS") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>First Name</td>
                                <td><asp:Label ID="FIRSTNAME" runat="server" Text='<%# Bind("FIRSTNAME") %>'></asp:Label>
                                </td>
                                <td>Business Phone</td>
                                <td><asp:Label ID="PHONE" runat="server" Text='<%# Bind("PHONE") %>'></asp:Label>
                                </td>
                                <td>Suburb</td>
                                <td><asp:Label ID="SUBURB" runat="server" Text='<%# Bind("SUBURB") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Last Name</td>
                                <td><asp:Label ID="LASTNAME" runat="server" Text='<%# Bind("LASTNAME") %>'></asp:Label>
                                </td>
                                <td>Mobile Phone</td>
                                <td><asp:Label ID="MOBILE" runat="server" Text='<%# Bind("MOBILE") %>'></asp:Label>
                                </td>
                                <td>State</td>
                                <td><asp:Label ID="STATE" runat="server" Text='<%# Bind("STATE") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Company Name</td>
                                <td><asp:Label ID="COMPANY_NAME" runat="server" Text='<%# Bind("COMPANY_NAME") %>'></asp:Label>
                                </td>
                                <td>Fax</td>
                                <td><asp:Label ID="FAX" runat="server" Text='<%# Bind("FAX") %>'></asp:Label>
                                </td>
                                <td>Postcode</td>
                                <td><asp:Label ID="POSTCODE" runat="server" Text='<%# Bind("POSTCODE") %>'></asp:Label>
                                </td>
                            </tr>
                        </table>

                            <asp:SqlDataSource ID="SqlDataSource13" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                                SelectCommand="SELECT [NMI], [MIRN], [DateConverted], [SourceCode], [ProductType] FROM [tblUser] WHERE ([UserID] = @UserID)">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="USERID" Name="UserID" PropertyName="Text" 
                                        Type="Int32" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            <asp:FormView ID="FormView3" runat="server" DataSourceID="SqlDataSource13" 
                                EnableModelValidation="True">

                                <ItemTemplate>

                                    <table>
                                        <tr>
                                            <td>Date Converted
                                            </td>
                                            <td><asp:Label ID="DateConvertedLabel" runat="server" 
                                        Text='<%# Bind("DateConverted") %>' />
                                            </td>
                                        
                                        </tr>
                                        <tr>
                                            <td>Product Type
                                            </td>
                                            <td><asp:Label ID="ProductTypeLabel" runat="server" 
                                        Text='<%# Bind("ProductType") %>' />
                                            </td>
                                        
                                        </tr>
                                        <tr>
                                            <td>Source Code
                                            </td>
                                            <td><asp:Label ID="SourceCodeLabel" runat="server" 
                                        Text='<%# Bind("SourceCode") %>' />
                                            </td>
                                        
                                        </tr>
                                        <tr>
                                            <td>NMI
                                            </td>
                                            <td><asp:Label ID="NMILabel" runat="server" Text='<%# Bind("NMI") %>' />
                                            </td>
                                        
                                        </tr>
                                        <tr>
                                            <td>MIRN
                                            </td>
                                            <td><asp:Label ID="MIRNLabel" runat="server" Text='<%# Bind("MIRN") %>' />
                                            </td>
                                        
                                        </tr>
                                        
                                        
                                        
                                    
                                    
                                    </table>
                                    

                                </ItemTemplate>
                            </asp:FormView>

                    </ItemTemplate>
                    <InsertItemTemplate>
                        <table border="1">
                            <tr>
                                <td>Title</td>
                                <td><asp:TextBox ID="TITLE" runat="server" Text='<%# Bind("TITLE") %>'></asp:TextBox>
                                </td>
                                <td>Email</td>
                                <td><asp:TextBox ID="EMAIL" runat="server" Text='<%# Bind("EMAIL") %>'></asp:TextBox>
                                </td>
                                <td>Street</td>
                                <td><asp:TextBox ID="ADDRESS" runat="server" Text='<%# Bind("ADDRESS") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>First Name</td>
                                <td><asp:TextBox ID="FIRSTNAME" runat="server" Text='<%# Bind("FIRSTNAME") %>'></asp:TextBox>
                                </td>
                                <td>Business Phone</td>
                                <td><asp:TextBox ID="PHONE" runat="server" Text='<%# Bind("PHONE") %>'></asp:TextBox>
                                </td>
                                <td>Suburb</td>
                                <td><asp:TextBox ID="SUBURB" runat="server" Text='<%# Bind("SUBURB") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Last Name</td>
                                <td><asp:TextBox ID="LASTNAME" runat="server" Text='<%# Bind("LASTNAME") %>'></asp:TextBox>
                                </td>
                                <td>Mobile Phone</td>
                                <td><asp:TextBox ID="MOBILE" runat="server" Text='<%# Bind("MOBILE") %>'></asp:TextBox>
                                </td>
                                <td>State</td>
                                <td><asp:TextBox ID="STATE" runat="server" Text='<%# Bind("STATE") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Company Name</td>
                                <td><asp:TextBox ID="COMPANY_NAME" runat="server" Text='<%# Bind("COMPANY_NAME") %>'></asp:TextBox>
                                </td>
                                <td>Fax</td>
                                <td><asp:TextBox ID="FAX" runat="server" Text='<%# Bind("FAX") %>'></asp:TextBox>
                                </td>
                                <td>Postcode</td>
                                <td><asp:TextBox ID="POSTCODE" runat="server" Text='<%# Bind("POSTCODE") %>'></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    
                    </InsertItemTemplate>
                </asp:TemplateField>
   




                <asp:TemplateField HeaderText="Feedback History">
                    <ItemTemplate>
                    <asp:LinkButton ID="LinkButton3" runat="server" Text="Add New Case" onclick="AddNewCaseOnClick" ></asp:LinkButton>
                <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
            DeleteCommand="DELETE FROM [tblFeedback_Case] WHERE [CASEID] = @CASEID" 
            InsertCommand="INSERT INTO [tblFeedback_Case] ([CFID]) VALUES (@CFID)" 
            SelectCommand="SELECT [CASEID], [CFID] FROM [tblFeedback_Case] WHERE ([CFID] = @CFID) ORDER BY [CASEID] DESC" 
            
            UpdateCommand="UPDATE [tblFeedback_Case] SET [CFID] = @CFID WHERE [CASEID] = @CASEID">
            <DeleteParameters>
                <asp:Parameter Name="CASEID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="CFID" Type="Int32" />
            </InsertParameters>
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" Name="CFID" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="CFID" Type="Int32" />
                <asp:Parameter Name="CASEID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
            
                <asp:DataList ID="DataList1" runat="server" DataKeyField="CASEID" 
                DataSourceID="SqlDataSource4" RepeatDirection="Horizontal"  ItemStyle-VerticalAlign="Top">
                    <ItemStyle VerticalAlign="Top"/>
                <ItemTemplate>
                    
                    <asp:Label ID="CASEIDLabel" runat="server" Text='<%# Eval("CASEID") %>'    Visible="false"/>

                    
                    <asp:Label ID="CFIDLabel" runat="server" Text='<%# Eval("CFID") %>'  Visible="false"/>

                        <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                            DeleteCommand="DELETE FROM [tblFeedback_Case] WHERE [CASEID] = @CASEID" 
                            InsertCommand="INSERT INTO [tblFeedback_Case] ([CFID], [REGI_DATE], [LOG_BY], [OMEN_CONTACT], [OMEN_ID], [FEED_TYPE], [FEED_LEVEL], [FEED_MODE], [FEED_CONTENT], [FEED_RETAILER],[FEED_CHANNEL], [HAS_ESCALATE], [ESCALATE_DATE], [RESP_MANAGER], [FEED_STATUS], [SOLVE_DATE]) VALUES (@CFID, @REGI_DATE, @LOG_BY, @OMEN_CONTACT, @OMEN_ID, @FEED_TYPE, @FEED_LEVEL, @FEED_MODE, @FEED_CONTENT, @FEED_RETAILER,@FEED_CHANNEL, @HAS_ESCALATE, @ESCALATE_DATE, @RESP_MANAGER, @FEED_STATUS, @SOLVE_DATE)" 
                            SelectCommand="SELECT * FROM [tblFeedback_Case] WHERE ([CASEID] = @CASEID)" 
                            UpdateCommand="UPDATE [tblFeedback_Case] SET  [REGI_DATE] = @REGI_DATE, [LOG_BY] = @LOG_BY, [OMEN_CONTACT] = @OMEN_CONTACT, [OMEN_ID] = @OMEN_ID, [FEED_TYPE] = @FEED_TYPE, [FEED_LEVEL] = @FEED_LEVEL, [FEED_MODE] = @FEED_MODE, [FEED_CONTENT] = @FEED_CONTENT, [FEED_RETAILER] = @FEED_RETAILER,[FEED_CHANNEL]=@FEED_CHANNEL, [HAS_ESCALATE] = @HAS_ESCALATE, [ESCALATE_DATE] = @ESCALATE_DATE, [RESP_MANAGER] = @RESP_MANAGER, [FEED_STATUS] = @FEED_STATUS, [SOLVE_DATE] = @SOLVE_DATE WHERE [CASEID] = @CASEID">
                            <DeleteParameters>
                                <asp:Parameter Name="CASEID" Type="Int32" />
                            </DeleteParameters>
                            <InsertParameters>
                                <asp:Parameter Name="CFID" Type="Int32" />
                                <asp:Parameter Name="REGI_DATE" Type="DateTime" />
                                <asp:Parameter Name="LOG_BY" Type="String" />
                                <asp:Parameter Name="OMEN_CONTACT" Type="String" />
                                <asp:Parameter Name="OMEN_ID" Type="String" />
                                <asp:Parameter Name="FEED_TYPE" Type="String" />
                                <asp:Parameter Name="FEED_LEVEL" Type="String" />
                                <asp:Parameter Name="FEED_MODE" Type="String" />
                                <asp:Parameter Name="FEED_CONTENT" Type="String" />
                                <asp:Parameter Name="FEED_RETAILER" Type="String" />
                                <asp:Parameter Name="FEED_CHANNEL" Type="String" />
                                <asp:Parameter Name="HAS_ESCALATE" Type="String" />
                                <asp:Parameter Name="ESCALATE_DATE" Type="DateTime" />
                                <asp:Parameter Name="RESP_MANAGER" Type="String" />
                                <asp:Parameter Name="FEED_STATUS" Type="String" />
                                <asp:Parameter Name="SOLVE_DATE" Type="DateTime" />
                            </InsertParameters>
                            <SelectParameters>
                                <asp:ControlParameter ControlID="CASEIDLabel" Name="CASEID" 
                                    PropertyName="Text" Type="Int32" />
                            </SelectParameters>
                            <UpdateParameters>
                                
                                <asp:Parameter Name="REGI_DATE" Type="DateTime" />
                                <asp:Parameter Name="LOG_BY" Type="String" />
                                <asp:Parameter Name="OMEN_CONTACT" Type="String" />
                                <asp:Parameter Name="OMEN_ID" Type="String" />
                                <asp:Parameter Name="FEED_TYPE" Type="String" />
                                <asp:Parameter Name="FEED_LEVEL" Type="String" />
                                <asp:Parameter Name="FEED_MODE" Type="String" />
                                <asp:Parameter Name="FEED_CONTENT" Type="String" />
                                <asp:Parameter Name="FEED_RETAILER" Type="String" />
                                <asp:Parameter Name="FEED_CHANNEL" Type="String" />
                                <asp:Parameter Name="HAS_ESCALATE" Type="String" />
                                <asp:Parameter Name="ESCALATE_DATE" Type="DateTime" />
                                <asp:Parameter Name="RESP_MANAGER" Type="String" />
                                <asp:Parameter Name="FEED_STATUS" Type="String" />
                                <asp:Parameter Name="SOLVE_DATE" Type="DateTime" />
                                <asp:Parameter Name="CASEID" Type="Int32" />
                            </UpdateParameters>
                        </asp:SqlDataSource>

                        <asp:DetailsView ID="DetailsView2" runat="Server" 
                        DataSourceID="SqlDataSource5" AutoGenerateRows="False" CssClass="mGrid"
                        PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt"  FieldHeaderStyle-Font-Bold="true" 
                        Font-Names="Times New Roman" CommandRowStyle-Font-Size="13"   CommandRowStyle-ForeColor="red" 
                            EnableModelValidation="True" DataKeyNames="CASEID">  
                        <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>


                            <CommandRowStyle Font-Size="13pt" ForeColor="Red" />
                            <FieldHeaderStyle Font-Bold="True" />
                            <Fields>
                                <asp:TemplateField ShowHeader="False">
                                    <EditItemTemplate>

                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                            CommandName="Edit" Text="Edit Case" Font-Size="14px"></asp:LinkButton>
                                             
                                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"  Font-Size="14px"
                                            CommandName="Delete" Text="Delete Case" OnClientClick="return confirm('Are You Sure to Delete?')"></asp:LinkButton>

                                    </ItemTemplate>


                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="CASEID" InsertVisible="False" 
                                    SortExpression="CASEID"   Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="Label6" runat="server" Text='<%# Bind("CASEID") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("CASEID") %>'></asp:Label>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="CFID" SortExpression="CFID"  Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="Label7" runat="server" Text='<%# Bind("CFID") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CFID") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CFID") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Registration Date" SortExpression="REGI_DATE">
                                    <ItemTemplate>
                                        <asp:Label ID="Label8" runat="server" Text='<%# Bind("REGI_DATE") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="TextBox2" runat="server" Text='<%# Bind("REGI_DATE") %>'></asp:Label>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("REGI_DATE") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Logged By" SortExpression="LOG_BY">
                                    <ItemTemplate>
                                        <asp:Label ID="Label9" runat="server" Text='<%# Bind("LOG_BY") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="TextBox3" runat="server" Text='<%# Bind("LOG_BY") %>'></asp:Label>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("LOG_BY") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                </asp:TemplateField>



                                <asp:TemplateField HeaderText="Feedback Mode" SortExpression="FEED_MODE">
                                    <ItemTemplate>
                                        <asp:Label ID="Label14" runat="server" Text='<%# Bind("FEED_MODE") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="FEED_MODE" runat="server" SelectedValue='<%# Bind("FEED_MODE") %>' >
                                            <asp:ListItem>Phone</asp:ListItem>
                                            <asp:ListItem>Written</asp:ListItem>
                                            <asp:ListItem>Email</asp:ListItem>
                                            <asp:ListItem Value="">Select...</asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("FEED_MODE") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                </asp:TemplateField>


                                <asp:TemplateField HeaderText="Feedback Details" SortExpression="FEED_TYPE">
                                    <ItemTemplate>
                                        <table>
                                            <tr>
                                                <td>Feedback Type
                                                </td>
                                                <td>
                                                    <asp:Label ID="FEED_TYPE" runat="server" Text='<%# Bind("FEED_TYPE") %>'></asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                        

                                        <div id="FEED_TYPE_div">
                                            <table>
                                            <tr>
                                                <td>Complaint Level status
                                                </td>
                                                <td>
                                                    <asp:Label ID="FEED_LEVEL" runat="server" Text='<%# Bind("FEED_LEVEL") %>'></asp:Label>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td>What is the complaint about?
                                                </td>
                                                <td>
                                                    <asp:Label ID="FEED_CONTENT" runat="server" Text='<%# Bind("FEED_CONTENT") %>'></asp:Label>
                                      

                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Is complaint related to partner retailer?
                                                </td>
                                                <td>
                                                    <asp:Label ID="FEED_RETAILER" runat="server" Text='<%# Bind("FEED_RETAILER") %>'></asp:Label>

                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Feedback Channel
                                                </td>
                                                <td>
                                                    <asp:Label ID="FEED_CHANNEL" runat="server" Text='<%# Bind("FEED_CHANNEL") %>'></asp:Label>

                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Complaint Status
                                                </td>
                                                <td>
                                                    <asp:Label ID="FEED_STATUS" runat="server" Text='<%# Bind("FEED_STATUS") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Date Resolved
                                                </td>
                                                <td>
                                                <asp:Label ID="SOLVE_DATE" runat="server" Text='<%# Bind("SOLVE_DATE") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Contact ombudsmen?
                                                </td>
                                                <td><asp:Label ID="Label10" runat="server" Text='<%# Bind("OMEN_CONTACT") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Ombudsmen Ref ID
                                                </td>
                                                <td><asp:Label ID="OMEN_ID" runat="server" Text='<%# Bind("OMEN_ID") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Escalate?
                                                </td>
                                                <td><asp:Label ID="HAS_ESCALATE" runat="server" Text='<%# Bind("HAS_ESCALATE") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Escalate Date
                                                </td>
                                                <td><asp:Label ID="ESCALATE_DATE" runat="server" Text='<%# Bind("ESCALATE_DATE") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Responsible Manager
                                                </td>
                                                <td><asp:Label ID="RESP_MANAGER" runat="server" Text='<%# Bind("RESP_MANAGER") %>'></asp:Label>
                                                </td>
                                            </tr>


                                            </table>

                                        </div>
                                        

                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <table>
                                            <tr>
                                                <td>Feedback Type
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="FEED_TYPE" runat="server" SelectedValue='<%# Bind("FEED_TYPE") %>'
                                                     onchange="FEED_TYPEChanged('FEED_TYPE_div',this.id)">
                                                        <asp:ListItem Value="">Select...</asp:ListItem>
                                                        <asp:ListItem>Complaint</asp:ListItem>
                                                        <asp:ListItem>Compliment/Praise</asp:ListItem>
                                                        <asp:ListItem>General Feedback</asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                        </table>

                                        
                                        <div id="FEED_TYPE_div">
                                            <table>
                                            <tr>
                                                <td>Complaint Level status
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="FEED_LEVEL" runat="server" SelectedValue='<%# Bind("FEED_LEVEL") %>' >
                                                        <asp:ListItem>Low</asp:ListItem>
                                                        <asp:ListItem>Medium</asp:ListItem>
                                                        <asp:ListItem>High</asp:ListItem>
                                                        <asp:ListItem>Extreme</asp:ListItem>
                                                        <asp:ListItem Value="">Select...</asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td>What is the complaint about?
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="FEED_CONTENT" runat="server" 
                                                        SelectedValue='<%# Bind("FEED_CONTENT") %>' DataSourceID="SqlDataSource12" 
                                                        DataTextField="about" DataValueField="about" >
                                                    </asp:DropDownList>

                                                    <asp:SqlDataSource ID="SqlDataSource12" runat="server" 
                                                        ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                                                        SelectCommand="SELECT DISTINCT [id], [about] FROM [tblFeedback_About] ORDER BY [id]">
                                                    </asp:SqlDataSource>
                                        

                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Is complaint related to partner retailer?
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="FEED_RETAILER" runat="server" SelectedValue='<%# Bind("FEED_RETAILER") %>' >
                                                        <asp:ListItem>Truenergy</asp:ListItem>
                                                        <asp:ListItem>BlueNRG</asp:ListItem>
                                                        <asp:ListItem>ERMPower</asp:ListItem>
                                                        <asp:ListItem>Alinta Energy</asp:ListItem>
                                                        <asp:ListItem Value="">No</asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Feedback Channel
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="FEED_CHANNEL" runat="server" SelectedValue='<%# Bind("FEED_CHANNEL") %>' >
                                                        <asp:ListItem>TeleFields</asp:ListItem>
                                                        <asp:ListItem Value="">No</asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Complaint Status
                                                </td>
                                                <td>
                                                   <asp:DropDownList ID="FEED_STATUS" runat="server" SelectedValue='<%# Bind("FEED_STATUS") %>' >
                                                        <asp:ListItem>resolved</asp:ListItem>
                                                        <asp:ListItem>unresolved</asp:ListItem>
                                                        <asp:ListItem Value="">Select...</asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Date Resolved
                                                </td>
                                                <td>
                                                <asp:TextBox ID="SOLVE_DATE" runat="server" Text='<%# Bind("SOLVE_DATE") %>'  onclick="WdatePicker()"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Contacted ombudsmen?
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="OMEN_CONTACT" runat="server" SelectedValue='<%# Bind("OMEN_CONTACT") %>'
     >
                                                            <asp:ListItem>Yes</asp:ListItem>
                                                            <asp:ListItem>No</asp:ListItem>
                                                            <asp:ListItem Value="">Select...</asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Ombudsmen ID
                                                </td>
                                                <td><asp:TextBox ID="OMEN_ID" runat="server" Text='<%# Bind("OMEN_ID") %>'></asp:TextBox>
                                                </td>
                                            </tr>





                                            <tr>
                                                <td>Escalate?
                                                </td>
                                                <td>
                                                <asp:DropDownList ID="HAS_ESCALATE" runat="server" SelectedValue='<%# Bind("HAS_ESCALATE") %>' >
                                                    <asp:ListItem>Yes</asp:ListItem>
                                                    <asp:ListItem>No</asp:ListItem>
                                                    <asp:ListItem Value="">Select...</asp:ListItem>
                                                </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Escalate Date
                                                </td>
                                                <td><asp:TextBox ID="ESCALATE_DATE" runat="server" Text='<%# Bind("ESCALATE_DATE") %>'  onclick="WdatePicker()"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Responsible Manager
                                                </td>
                                                <td>
                                                <asp:DropDownList ID="RESP_MANAGER" runat="server" SelectedValue='<%# Bind("RESP_MANAGER") %>' >
                                                    <asp:ListItem>Samantha Davies</asp:ListItem>
                                                    <asp:ListItem>Kelvin Wiggins</asp:ListItem>
                                                    <asp:ListItem>Daven Bettridge</asp:ListItem>
                                                    <asp:ListItem Value="">Select...</asp:ListItem>
                                                </asp:DropDownList>
                                                </td>
                                            </tr>



                                            </table>

                                        </div>
                                        
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("FEED_TYPE") %>'></asp:TextBox>
                                    </InsertItemTemplate>
                                </asp:TemplateField>
                                

                                <asp:TemplateField ShowHeader="False">
                                    <EditItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                            CommandName="Update" Text="Update" Font-Size="14px"></asp:LinkButton>
                                        &nbsp;
                                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                            CommandName="Cancel" Text="Cancel" Font-Size="14px"></asp:LinkButton>
                                    </EditItemTemplate>
                                    <ItemTemplate>

                                    </ItemTemplate>



                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Comment History">

                                    <ItemTemplate>
                                        <asp:SqlDataSource ID="SqlDataSource6" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                        DeleteCommand="DELETE FROM [tblFeedback_Case_Comment] WHERE [ID] = @ID" 
                        InsertCommand="INSERT INTO [tblFeedback_Case_Comment] ([CASEID], [OPERATOR], [DATE], [COMMENT]) VALUES (@CASEID, @OPERATOR, @DATE, @COMMENT)" 
                        SelectCommand="SELECT * FROM [tblFeedback_Case_Comment] WHERE ([CASEID] = @CASEID)" 
                        UpdateCommand="UPDATE [tblFeedback_Case_Comment] SET  [DATE] = @DATE, [COMMENT] = @COMMENT WHERE [ID] = @ID">
                        <DeleteParameters>
                            <asp:Parameter Name="ID" Type="Int32" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="CASEID" Type="Int32" />
                            <asp:Parameter Name="OPERATOR" Type="String" />
                            <asp:Parameter Name="DATE" Type="DateTime" />
                            <asp:Parameter Name="COMMENT" Type="String" />
                        </InsertParameters>
                        <SelectParameters>
                            <asp:ControlParameter ControlID="CASEIDLabel" Name="CASEID" PropertyName="Text" 
                                Type="Int32" />
                        </SelectParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="DATE" Type="DateTime" />
                            <asp:Parameter Name="COMMENT" Type="String" />
                            <asp:Parameter Name="ID" Type="Int32" />
                        </UpdateParameters>
                    </asp:SqlDataSource>

                                        <asp:GridView ID="GridView3" runat="server" CssClass="mGrid" 
                        PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" 
                        DataSourceID="SqlDataSource6" AutoGenerateColumns="False" 
                        DataKeyNames="ID"  ShowFooter="false" ShowHeader="false"
                        EnableModelValidation="True">
                        <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>


                        <Columns>
                            <asp:TemplateField ShowHeader="False">
                                <EditItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                        CommandName="Update" Text="Update" Font-Size="14px"></asp:LinkButton>
                                    &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                        CommandName="Cancel" Text="Cancel" Font-Size="14px"></asp:LinkButton>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                        CommandName="Edit" Text="Edit" Font-Size="14px"></asp:LinkButton>
                                    &nbsp;

                                </ItemTemplate>


                            </asp:TemplateField>
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"  Font-Size="14px"
                                        CommandName="Delete" Text="Delete" OnClientClick="return confirm('Are You Sure to Delete?')"></asp:LinkButton>
  
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ID" InsertVisible="False" SortExpression="ID" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("ID") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="CASEID" SortExpression="CASEID" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("CASEID") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CASEID") %>'></asp:TextBox>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="OPERATOR" SortExpression="OPERATOR">
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("OPERATOR") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="OPERATOR" runat="server" Text='<%# Bind("OPERATOR") %>'  ReadOnly="true"></asp:TextBox>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="DATE" SortExpression="DATE">
                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("DATE") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("DATE") %>' ReadOnly="true"></asp:TextBox>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="COMMENT" SortExpression="COMMENT">
                                <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("COMMENT") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>

                                    <asp:TextBox ID="COMMENT" Rows="5" cols="40" Width="600px" runat="server" TextMode="MultiLine"
                                        Text='<%# Bind("COMMENT") %>'></asp:TextBox>
                                    
                                </EditItemTemplate>
                            </asp:TemplateField>




                        </Columns>
                                            <PagerStyle CssClass="pgr" />
                    </asp:GridView>

                                        <asp:Label ID="CaseLabelnew" runat="server" Text='<%# Eval("CASEID") %>' Visible="false"/>
                                        <asp:Button ID="LinkButtonAddNewComment" runat="server" Text="Add New Comment" onclick="AddNewCommentOnClick" 
                                        CommandArgument='<%# Eval("CASEID") %>' ></asp:Button>
                                    </ItemTemplate>

                                    <EditItemTemplate>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                    </InsertItemTemplate>

                                </asp:TemplateField>


                            </Fields>
                            <PagerStyle CssClass="pgr" />
                        </asp:DetailsView>





                </ItemTemplate>
            </asp:DataList>
                    </ItemTemplate>
                    <InsertItemTemplate>
                    </InsertItemTemplate>
                    <EditItemTemplate>
                    </EditItemTemplate>
                </asp:TemplateField>


                <asp:TemplateField HeaderText="File Record">
                    <ItemTemplate>
                        <asp:Label ID="CFIDLabel" runat="server" Text='<%# Eval("CFID") %>' Visible="false"/>

                        <asp:SqlDataSource ID="SqlDataSource7" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
                        DeleteCommand="DELETE FROM [tblFeedback_Case_File] WHERE [ID] = @ID" 
                        InsertCommand="INSERT INTO [tblFeedback_Case_File] ([DATE], [CASEID], [NAME], [SIZE], [DATA]) VALUES (@DATE, @CASEID, @NAME, @SIZE, @DATA)" 
                        SelectCommand="SELECT * FROM [tblFeedback_Case_File] WHERE ([CASEID] = @CASEID)" 
                        
                        
                        UpdateCommand="UPDATE [tblFeedback_Case_File] SET [DATE] = @DATE, [CASEID] = @CASEID, [NAME] = @NAME, [SIZE] = @SIZE, [DATA] = @DATA WHERE [ID] = @ID">
                            <DeleteParameters>
                                <asp:Parameter Name="ID" Type="Int32" />
                            </DeleteParameters>
                            <InsertParameters>
                                <asp:Parameter Name="DATE" Type="DateTime" />
                                <asp:Parameter Name="CASEID" Type="Int32" />
                                <asp:Parameter Name="NAME" Type="String" />
                                <asp:Parameter Name="SIZE" Type="Int64" />
                                <asp:Parameter Name="DATA" Type="Object" />
                            </InsertParameters>
                            <SelectParameters>
                                <asp:ControlParameter ControlID="CFIDLabel" Name="CASEID" PropertyName="Text" 
                                    Type="Int32" />
                            </SelectParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="DATE" Type="DateTime" />
                                <asp:Parameter Name="CASEID" Type="Int32" />
                                <asp:Parameter Name="NAME" Type="String" />
                                <asp:Parameter Name="SIZE" Type="Int64" />
                                <asp:Parameter Name="DATA" Type="Object" />
                                <asp:Parameter Name="ID" Type="Int32" />
                            </UpdateParameters>
                    </asp:SqlDataSource>

                        <asp:GridView ID="GridView4" runat="server" CssClass="mGrid" 
                        PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" 
                        DataSourceID="SqlDataSource7" AutoGenerateColumns="False" 
                        DataKeyNames="ID" ShowFooter="false" ShowHeader="false"
                        EnableModelValidation="True" AllowSorting="True">
                        <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>



                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:HyperLink ID="HyperLink1" runat="server"
                                            NavigateUrl='<%# Eval("ID", "GetFile.aspx?ID={0}") %>'
                                            Text="Download" Font-Size="14px"></asp:HyperLink>

                                        <asp:LinkButton ID="LinkButtonDelete2" runat="server" CausesValidation="False"  Font-Size="14px"
                                            CommandName="Delete" Text="Delete" OnClientClick="return confirm('Are You Sure to Delete?')"></asp:LinkButton>

                                    </ItemTemplate>
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="ID" InsertVisible="False" SortExpression="ID" Visible="false">
                                    <EditItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("ID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Upload Date" SortExpression="DATE">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("DATE") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("DATE") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="CASEID" SortExpression="CASEID" Visible="false">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("CASEID") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("CASEID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="File Name" SortExpression="NAME">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("NAME") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("NAME") %>'></asp:Label>
                                    </ItemTemplate>

                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="File Size" SortExpression="SIZE" Visible="false">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("SIZE") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# Bind("SIZE") %>'></asp:Label>
                                    </ItemTemplate>
                                    
                                </asp:TemplateField>
                            </Columns>
                            <PagerStyle CssClass="pgr" />
                        </asp:GridView>


                        <input type="file" name="fileInput" />
                        <asp:Button ID="btnUpload" Text="Upload File Attachment" runat="server"
                                             OnClick="btnUpload_Click" CommandArgument='<%# Eval("CFID") %>' />



                    </ItemTemplate>
                    <InsertItemTemplate>
                    </InsertItemTemplate>
                    <EditItemTemplate>
                    </EditItemTemplate>

                </asp:TemplateField>
                


            </Fields>

<PagerStyle CssClass="pgr"></PagerStyle>
        </asp:DetailsView>


        </center>

    </div>
    <div id="contentcolumn">


    </div>

    <div id="rightcolumn">
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SQLServer2005DBConnectionString %>" 
            SelectCommand="SELECT TOP 15 * FROM [tblFeedback_Log] ORDER BY [DATE] DESC"></asp:SqlDataSource>

        <asp:GridView ID="GridView2" runat="server" CssClass="mGrid" 
            PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt"  PageSize="5"
            DataSourceID="SqlDataSource3" AutoGenerateColumns="False" 
            DataKeyNames="ID" AllowPaging="True" AllowSorting="True"
            EnableModelValidation="True">
            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
            <Columns>

                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID"  Visible="FALSE"/>
                <asp:BoundField DataField="DATE" HeaderText="DATE" SortExpression="DATE" />
                <asp:BoundField DataField="USERNAME" HeaderText="USERNAME" 
                    SortExpression="USERNAME" />
                <asp:BoundField DataField="BEHAVIOR" HeaderText="BEHAVIOR" 
                    SortExpression="BEHAVIOR" />
            </Columns>
        </asp:GridView>
    
    </div>






    </div>
    </form>
</body>
<script src="date.f-0.5.0-min.js" type="text/javascript"></script>
<script src="Complain.js" type="text/javascript"></script>
</html>
